import About from '../pages/About'
import Home from '../pages/Home'
import Message from '../pages/Home/Message'
import News from '../pages/Home/News'
import Detail from '../pages/Home/Message/Detail'
import Header from '../components/Header'
import { NavLink,Routes,Route,Navigate,  } from 'react-router-dom'

const router = () => (
    <Routes>
        
        <Route path="/about" element={<About />} />
        <Route path="/home" element={<Home />}>
            <Route path="/home/message" element={<Message />} >
                <Route path="/home/message/detail/:id/:title" element={<Detail />}/>
            </Route>
            <Route path="/home/news" element={<News />} />
            <Route path="/home" element={<Navigate to="news"/>}/>
        </Route>
        <Route path="/" element={<Navigate to="/about" />} />
    </Routes>
)

export default router